package engine;

import model.City;
import model.Ressources;

public class GameEngine extends Engine {

    /** Attributs */
    private Ressources m_economy;
    private City m_city;

    /** Constructeurs */
    public GameEngine() {
        m_economy = new Ressources();
        m_economy.set(Ressources.Type.PERSONS, 0, 5);
        m_economy.set(Ressources.Type.DOLLARS, 10000000);
        m_economy.set(Ressources.Type.GOODS, 0);
        m_city = new City(m_economy);
    }

    /** Accesseurs */
    public City getCity() { return m_city; }
    public Ressources getEconomy() { return m_economy; }

    /** Methodes */
    protected void begin() {}

    protected void end() {}
	
    protected void iteration() {
        try {
            Thread.sleep(1000);
            getCity().update(1);
        }
        catch (InterruptedException e) { e.printStackTrace(); }        
    }

}